package
{
	import org.flixel.FlxSprite;
	import org.flixel.FlxText;
	import org.flixel.FlxGroup;

	public class ComponentTitle extends FlxGroup
	{
		public function ComponentTitle(title:String, x:int, y:int)
		{
			var bg:FlxSprite = new FlxSprite(x, y, Res.Scroll);
			var text:FlxText = new FlxText(x + 5, 0, bg.width - 10, title, false);
			text.setFormat("Georgia", 18, 0x000000, "center");
			text.y = bg.y + (bg.height - text.height)/2;
			
			add(bg);
			add(text);
		}
	}
}